import React from 'react';
import Category from '../../components/category'
import Ad from './subpage/ad'
import List from './subpage/List'
import {connect} from 'react-redux'
import LoadMore from '../../components/loadMore'
import Header from "../../components/Header/Header"
class Home extends React.Component {
  constructor(props) {
    super(props);

  }


  render() {
    return (
      <div>
        <Header cityName={this.props.userinfo.cityName}/>
        <Category/>
        <div style={{height:"15px"}}></div>
        <Ad/>
        <div style={{height:"15px"}}></div>
        <List cityName={this.props.userinfo.cityName}/>
       </div>
    )
  }

}
function mapStateToProps(state) {
  return {
    userinfo:state.userinfo
  }
}

function mapDispatchToProps(dispathc) {
  return{

  }
}

export default connect(
  mapStateToProps,
  mapDispatchToProps
)(Home)

